﻿using System.Collections.Generic;
using Newtonsoft.Json;

namespace DailyReport.Models
{
    /// <summary>
    /// BearyChart - Outgoing 的Json回文格式
    /// </summary>
    public class BearyResponse
    {
        [JsonProperty(PropertyName = "text")]
        public string Text { get; set; }

        [JsonProperty(PropertyName = "attachments")]
        public List<BearyAttachments> ListAttachment { get; set; }

        public BearyResponse()
        {
            ListAttachment = new List<BearyAttachments>();
        }
    }

    public class BearyAttachments
    {
        [JsonProperty(PropertyName = "title")]
        public string Title { get; set; }

        [JsonProperty(PropertyName = "text")]
        public string Text { get; set; }

        [JsonProperty(PropertyName = "color")]
        public string Color { get; set; }

        [JsonProperty(PropertyName = "images")]
        public List<BearyUrl> ListImage { get; set; }

        public BearyAttachments()
        {
            ListImage = new List<BearyUrl>();
        }
    }

    public class BearyUrl
    {
        [JsonProperty(PropertyName = "url")]
        public string Url { get; set; }
    }
}